Ext.define('component.system.permissionAssignmentPanel', {
	extend : 'Ext.panel.Panel',
	initComponent : function() {
		var me = this;
		var treeStore = Ext.create('Ext.data.TreeStore',{
			  proxy:{
			    type:'ajax',
			    url:contextPath+'/system/permissionAssignment/listAuthorized',
			    reader:{
			      type:'json',
			      root:'obj'
			    },
		        actionMethods: {read: 'POST'},
		        extraParams:{
		        	"parentCode": this.parentCode
		        }
			  },
			  root:{
			    text:'房产树',
			    expanded : true,
			  },
			  autoLoad:false
			  
		});
		var treePanel = Ext.create('Ext.tree.Panel', {
			id : 'estateTree',
			layout:'fit',
			stateId : 'appnav',
			stateful : true,
			margins : '2 0 0 0',
			collapsible : true,
			animCollapse : true,
			rootVisible: false,
			useArrows: true,
			store : treeStore
		});
		
		
		var defaultConfig = {
				closable : false,
		   	   	autoScroll : true,
		   	   	border : false,
			   	layout:'column',
			   	items: [{
			   	    title: '菜单/功能权限',
			   	    columnWidth: .2,
			   	    items:treePanel
			   	},{
			   	    title: '数据权限',
			   	    columnWidth: .5,
			   	    html:'未实现'
			   	}]
		};
		Ext.apply(this,defaultConfig);
		this.callParent();
	}
});